package com.guangyunl.c_object;

public class Test01 {
    public static void main(String[] args) {
        Phone phone1 = new Phone();
        System.out.println("phone1 = " + phone1);   // 地址值
        System.out.println("phone1.brand = " + phone1.brand); // null
        System.out.println("phone1.price = " + phone1.price); // 0
        System.out.println("phone1.color = " + phone1.color); // null


        phone1.brand = "xiaomi";
        phone1.price = 2999;
        phone1.color = "白色";

        System.out.println("phone1 = " + phone1);   // 地址值
        System.out.println("phone1.brand = " + phone1.brand); // null
        System.out.println("phone1.price = " + phone1.price); // 0
        System.out.println("phone1.color = " + phone1.color);

    }
}
/*
phone1.brand = null
phone1.price = 0
phone1.color = null
phone1 = com.guangyunl.c_object.Phone@1b6d3586
phone1.brand = xiaomi
phone1.price = 2999
phone1.color = 白色
 */